import request from "@/utils/request.js";
const url = '/salesman'

/**
 *   最近30用户增长数量
 */
export function checkHowManyMoreCustomersThanLastWeek(salesmanId) {
	return request.get(url + `/customerCentre/checkHowManyMoreCustomersThanLastWeek/${salesmanId}`);
}

/**
 * 一键获客
#109240353

 */
export function getCustomersWithOneClick(data) {
	return request.post(url + '/win_the_customer/getCustomersWithOneClick', data);
}

/*
 *客户增加数量(折线图数据)
 */
export const getLineDataList = (data) => request.post(url + '/customerCentre/addCustomersInTheTimeFrame', data)

/*
 *用户概况
 */
export const getUserData = (data) => request.post(url + '/customerCentre/addCustomersInTheTimeFrameNoKV', data)

/*
 *用户增长来源(饼图数据)
 */
export const getPieDataList = (data) => request.post(url +
	'/customerCentre/addCustomersInTheTimeFrameAssociatedChannel', data)



/*
 *客户增加数量(折线图数据)
 */
export const queryNewCustomerNum = (data) => request.post(url + '/admin_statistics/queryNewCustomerNum', data)

/*
 *业务员小程序 管理员统计 查询新增业务员数量
 */
export const queryNewSalesmanNum = (data) => request.post(url + '/admin_statistics/queryNewSalesmanNum', data)

/*
 *业务员小程序 管理员统计 查询新增激活权益卡数量
 */
export const queryNewCardNum = (data) => request.post(url + '/admin_statistics/queryNewCardNum', data)

/*
 *业务员小程序 管理员统计 查询新增订单金额、数量
 */
export const queryNewOrderNum = (data) => request.post(url + '/admin_statistics/queryNewOrderNum', data)

export const queryTeamOrderNum = (data) => request.post(url + '/admin_statistics/queryTeamOrderNum', data)

//业务员小程序 管理员统计 查询自己的新增订单金额、数量
export const queryNewOrderNumOur = (data) => request.post(url + '/admin_statistics/queryNewOrderNumOur', data)